[IA64] libxc trivial fix compilation error.
authorAlex Williamson <alex.williamson@hp.com>
Tue, 12 Jun 2007 21:23:55 +0000 (15:23 -0600)
committerAlex Williamson <alex.williamson@hp.com>
Tue, 12 Jun 2007 21:23:55 +0000 (15:23 -0600)
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
tools/libxc/ia64/xc_ia64_hvm_build.c
tools/libxc/xc_dom_ia64.c

index 0c0a9e36e0095e4cb46725a99044ec3f3a9b6a81..73fc03a597bfe2643d8a21e8cef281d9f2515d07 100644 (file)
@@ -834,7 +834,7 @@ xc_ia64_setup_memmap_info(int xc_handle, uint32_t dom,
     
     assert(nr_mds <=
            (PAGE_SIZE * memmap_info_num_pages -
-            offsetof(*memmap_info, memdesc))/sizeof(*md));
+            offsetof(typeof(*memmap_info), memdesc))/sizeof(*md));
     memmap_info->efi_memmap_size = nr_mds * sizeof(*md);
     memmap_info->efi_memdesc_size = sizeof(*md);
     memmap_info->efi_memdesc_version = EFI_MEMORY_DESCRIPTOR_VERSION;
index 7c7eac0eb26ef5a3d63c1d861ef8146a6555b315..dfe27e691754e5252666629d6c459f568b3f174c 100644 (file)
@@ -203,9 +203,9 @@ static int ia64_setup_memmap(struct xc_dom_image *dom)
     num_mds++;
     memmap_info->efi_memmap_size = num_mds * sizeof(md[0]);
     munmap(memmap_info, page_size * memmap_info_num_pages);
-    assert(nr_mds <=
+    assert(num_mds <=
            (page_size * memmap_info_num_pages -
-            offsetof(*memmap_info, memdesc))/sizeof(*md));
+            offsetof(typeof(*memmap_info), memdesc))/sizeof(*md));
 
     /*
      * kludge: we need to pass memmap_info page's pfn and other magic pages